#ifndef __IMA_MQ_INTERFACE_H__
#define __IMA_MQ_INTERFACE_H__

#include "ImaConf.h"

#define MSGQBUFSZ	1024


class ImaMqInterface {

	public:
		static ImaMqInterface* getInstance(ImaConf& conf);
		~ImaMqInterface();
		bool deqeueConfCode(char* pBuf);
		bool deqeueNewPassword(char* pBuf);
		bool dequeueFeedbackMsg(char* pBuf);

	private:
		ImaMqInterface(ImaConf& conf);
		bool dequeueMessage(int msgQId, char* pBuf);

		static ImaMqInterface* mpMqInterface;
		int mRegConfCodeMsgQId;
		int mNewPasswordMsgQId;
		int mUserFeedbackMsgQId;

		struct msgbuf {
			long msg_type;
			char msg_buf[MSGQBUFSZ];
		};
};
		
#endif//__IMA_MQ_INTERFACE_H__
